#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{

    //  ffplay -pixel_format yuv420p -framerate 30 -video_size 544x960 demo02.yuv
    yuvEncodeThread = new YUVEncodeThread(this);

    YUVFileSpec fileSpec(544,960,30,AV_PIX_FMT_YUV420P,"/Users/tgy/Documents/ffmpeg/video/demo02.yuv","/Users/tgy/Documents/ffmpeg/video/demo02_yuv.h264");
    yuvEncodeThread->init(fileSpec);

    yuvEncodeThread->start();
}
